package tt.dz.appserver.dao.ext;

import java.util.List;

import org.apache.commons.collections.map.ListOrderedMap;
import org.springframework.stereotype.Repository;

import tt.dz.appserver.dao.base.BasisDao;
import tt.dz.appserver.entity.model.dic.Province;
import tt.dz.appserver.util.StringUtils;

@Repository
public class ProvinceDao extends BasisDao<Province> {

	/** 省查询 */
/*	public List<Province> findProvince() {

		return super.findListAutomaticOfClass(Province.class, null, null, null, "province_name", 1);
	}*/

	public List<Province> findProvince(String provinceName) {
		
		ListOrderedMap map = new ListOrderedMap();
		if (StringUtils.isNotBlank(provinceName)) {
			map.put("province_name", provinceName);
		}

		return super.findListAutomaticOfClass(Province.class, null, null, null, "province_name", 1);
	}
}
